#include "luxrays/kernels/kernels.h"
std::string luxrays::KernelSource_Pixel_ClearFB = 
"/***************************************************************************\n"
" *   Copyright (C) 1998-2010 by authors (see AUTHORS.txt )                 *\n"
" *                                                                         *\n"
" *   This file is part of LuxRays.                                         *\n"
" *                                                                         *\n"
" *   LuxRays is free software; you can redistribute it and/or modify       *\n"
" *   it under the terms of the GNU General Public License as published by  *\n"
" *   the Free Software Foundation; either version 3 of the License, or     *\n"
" *   (at your option) any later version.                                   *\n"
" *                                                                         *\n"
" *   LuxRays is distributed in the hope that it will be useful,            *\n"
" *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *\n"
" *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *\n"
" *   GNU General Public License for more details.                          *\n"
" *                                                                         *\n"
" *   You should have received a copy of the GNU General Public License     *\n"
" *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *\n"
" *                                                                         *\n"
" *   LuxRays website: http://www.luxrender.net                             *\n"
" ***************************************************************************/\n"
"\n"
"typedef struct {\n"
"	float r, g, b;\n"
"} Spectrum;\n"
"\n"
"typedef Spectrum Pixel;\n"
"\n"
"__kernel __attribute__((reqd_work_group_size(8, 8, 1))) void PixelClearFB(\n"
"	const unsigned int width,\n"
"	const unsigned int height,\n"
"    __global Pixel *frameBuffer) {\n"
"    const unsigned int px = get_global_id(0);\n"
"    if(px >= width)\n"
"        return;\n"
"    const unsigned int py = get_global_id(1);\n"
"    if(py >= height)\n"
"        return;\n"
"	const unsigned int offset = px + py * width;\n"
"\n"
"	__global Pixel *p = &frameBuffer[offset];\n"
"	p->r = 0.f;\n"
"	p->g = 0.f;\n"
"	p->b = 0.f;\n"
"}\n"
;
